import Vue from "vue"
import Vuex from "vuex"

const actions = {

}
const mutations = {
  SET_TOKEN(state, value) {
    state.tokenStr = value
    localStorage.setItem('tokenStr', value)
  },
  SET_IDENTITY(state, value) {
    state.identity = value
    localStorage.setItem('identity', value)
  }
}
const state = {
  tokenStr: '',
  identity: ''
}

Vue.use(Vuex)
export default new Vuex.Store({
  actions,
  mutations,
  state
})